home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'ComObj.pas' rev: 3.00
-
- #ifndef ComObjHPP
- #define ComObjHPP
- #include <SysUtils.hpp>
- #include <ActiveX.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Comobj
- {
- //-- type declarations -------------------------------------------------------
- class DELPHICLASS TComServerObject;
- class PASCALIMPLEMENTATION TComServerObject : public System::TObject
- {
- typedef System::TObject inherited;
-
- protected:
- virtual int __fastcall CountObject(bool Created) = 0;
- virtual int __fastcall CountFactory(bool Created) = 0;
- virtual System::AnsiString __fastcall GetHelpFileName(void) = 0;
- virtual System::AnsiString __fastcall GetServerFileName(void) = 0;
- virtual System::AnsiString __fastcall GetServerKey(void) = 0;
- virtual System::AnsiString __fastcall GetServerName(void) = 0;
- virtual _di_ITypeLib __fastcall GetTypeLib(void) = 0;
-
- public:
- __property System::AnsiString HelpFileName = {read=GetHelpFileName};
- __property System::AnsiString ServerFileName = {read=GetServerFileName};
- __property System::AnsiString ServerKey = {read=GetServerKey};
- __property System::AnsiString ServerName = {read=GetServerName};
- __property _di_ITypeLib TypeLib = {read=GetTypeLib};
- public:
- /* TObject.Create */ __fastcall TComServerObject(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TComServerObject(void) { }
-
- };
-
- class DELPHICLASS TComObjectFactory;
- typedef void __fastcall (__closure *TFactoryProc)(TComObjectFactory* Factory);
-
- class DELPHICLASS TComClassManager;
- class PASCALIMPLEMENTATION TComClassManager : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TComObjectFactory* FFactoryList;
- void __fastcall AddObjectFactory(TComObjectFactory* Factory);
- void __fastcall RemoveObjectFactory(TComObjectFactory* Factory);
-
- public:
- void __fastcall ForEachFactory(TComServerObject* ComServer, TFactoryProc FactoryProc);
- TComObjectFactory* __fastcall GetFactoryFromClass(System::TMetaClass* ComClass);
- TComObjectFactory* __fastcall GetFactoryFromClassID(const GUID &ClassID);
- public:
- /* TObject.Create */ __fastcall TComClassManager(void) : System::TObject() { }
- /* TObject.Destroy */ __fastcall virtual ~TComClassManager(void) { }
-
- };
-
- class DELPHICLASS TComObject;
- class PASCALIMPLEMENTATION TComObject : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- void *__IUnknown; /* IUnknown [_Release=ObjRelease, _AddRef=ObjAddRef, QueryInterface=ObjQueryInterface
- ] */
- void *__ISupportErrorInfo; /* ISupportErrorInfo */
-
- public:
- operator ISupportErrorInfo*(void) { return (ISupportErrorInfo*)&__ISupportErrorInfo; }
- operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
-
- private:
- int FRefCount;
- TComObjectFactory* FFactory;
- void *FController;
- _di_IUnknown __fastcall GetController(void);
-
- protected:
- HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
- int __stdcall _AddRef(void);
- int __stdcall _Release(void);
- HRESULT __stdcall InterfaceSupportsErrorInfo(const GUID &iid);
-
- public:
- __fastcall TComObject(void);
- __fastcall TComObject(const _di_IUnknown Controller);
- __fastcall TComObject(TComObjectFactory* Factory, const _di_IUnknown Controller);
- __fastcall virtual ~TComObject(void);
- virtual void __fastcall Initialize(void);
- virtual int __stdcall ObjAddRef(void);
- virtual HRESULT __stdcall ObjQueryInterface(const GUID &IID, /* out */ void *Obj);
- virtual int __stdcall ObjRelease(void);
- virtual HRESULT __fastcall SafeCallException(System::TObject* ExceptObject, void * ExceptAddr);
- __property _di_IUnknown Controller = {read=GetController};
- __property TComObjectFactory* Factory = {read=FFactory};
- __property int RefCount = {read=FRefCount, nodefault};
- };
-
- typedef System::TMetaClass*TComClass;
-
- enum TClassInstancing { ciInternal, ciSingleInstance, ciMultiInstance };
-
- class PASCALIMPLEMENTATION TComObjectFactory : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- void *__IUnknown; /* IUnknown */
- void *__IClassFactory; /* IClassFactory */
- void *__IClassFactory2; /* IClassFactory2 */
-
- public:
- operator IClassFactory2*(void) { return (IClassFactory2*)&__IClassFactory2; }
- operator IClassFactory*(void) { return (IClassFactory*)&__IClassFactory; }
- operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
-
- private:
- TComObjectFactory* FNext;
- TComServerObject* FComServer;
- System::TMetaClass*FComClass;
- GUID FClassID;
- System::AnsiString FClassName;
- System::AnsiString FDescription;
- GUID FErrorIID;
- TClassInstancing FInstancing;
- System::WideString FLicString;
- int FRegister;
- bool FShowErrors;
- bool FSupportsLicensing;
-
- protected:
- virtual System::AnsiString __fastcall GetProgID(void);
- virtual System::WideString __fastcall GetLicenseString(void);
- virtual bool __fastcall HasMachineLicense(void);
- virtual bool __fastcall ValidateUserLicense(const System::WideString LicStr);
- HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
- int __stdcall _AddRef(void);
- int __stdcall _Release(void);
- HRESULT __stdcall CreateInstance(const _di_IUnknown UnkOuter, const GUID &IID, /* out */ void *Obj)
- ;
- HRESULT __stdcall LockServer(BOOL fLock);
- HRESULT __stdcall GetLicInfo(tagLICINFO &licInfo);
- HRESULT __stdcall RequestLicKey(int dwResrved, /* out */ System::WideString &bstrKey);
- HRESULT __stdcall CreateInstanceLic(const _di_IUnknown unkOuter, const _di_IUnknown unkReserved, const
- GUID &iid, const System::WideString bstrKey, /* out */ void *vObject);
-
- public:
- __fastcall TComObjectFactory(TComServerObject* ComServer, System::TMetaClass* ComClass, const GUID
- &ClassID, const System::AnsiString ClassName, const System::AnsiString Description, TClassInstancing
- Instancing);
- __fastcall virtual ~TComObjectFactory(void);
- virtual TComObject* __fastcall CreateComObject(const _di_IUnknown Controller);
- void __fastcall RegisterClassObject(void);
- virtual void __fastcall UpdateRegistry(bool Register);
- __property GUID ClassID = {read=FClassID};
- __property System::AnsiString ClassName = {read=FClassName};
- __property System::TMetaClass* ComClass = {read=FComClass};
- __property TComServerObject* ComServer = {read=FComServer};
- __property System::AnsiString Description = {read=FDescription};
- __property GUID ErrorIID = {read=FErrorIID, write=FErrorIID};
- __property System::WideString LicString = {read=FLicString, write=FLicString};
- __property System::AnsiString ProgID = {read=GetProgID};
- __property TClassInstancing Instancing = {read=FInstancing, nodefault};
- __property bool ShowErrors = {read=FShowErrors, write=FShowErrors, nodefault};
- __property bool SupportsLicensing = {read=FSupportsLicensing, write=FSupportsLicensing, nodefault};
-
- };
-
- class DELPHICLASS TTypedComObject;
- class PASCALIMPLEMENTATION TTypedComObject : public Comobj::TComObject
- {
- typedef Comobj::TComObject inherited;
-
- private:
- void *__IProvideClassInfo; /* IProvideClassInfo */
-
- public:
- operator IProvideClassInfo*(void) { return (IProvideClassInfo*)&__IProvideClassInfo; }
-
- protected:
- HRESULT __stdcall GetClassInfo(/* out */ _di_ITypeInfo &TypeInfo);
- public:
- /* TComObject.Create */ __fastcall TTypedComObject(void) : Comobj::TComObject() { }
- /* TComObject.CreateAggregated */ __fastcall TTypedComObject(const _di_IUnknown Controller) : Comobj::
- TComObject(Controller) { }
- /* TComObject.CreateFromFactory */ __fastcall TTypedComObject(TComObjectFactory* Factory, const _di_IUnknown
- Controller) : Comobj::TComObject(Factory, Controller) { }
- /* TComObject.Destroy */ __fastcall virtual ~TTypedComObject(void) { }
-
- };
-
- typedef System::TMetaClass*TTypedComClass;
-
- class DELPHICLASS TTypedComObjectFactory;
- class PASCALIMPLEMENTATION TTypedComObjectFactory : public Comobj::TComObjectFactory
- {
- typedef Comobj::TComObjectFactory inherited;
-
- private:
- _di_ITypeInfo FClassInfo;
-
- public:
- __fastcall TTypedComObjectFactory(TComServerObject* ComServer, System::TMetaClass* TypedComClass, const
- GUID &ClassID, TClassInstancing Instancing);
- _di_ITypeInfo __fastcall GetInterfaceTypeInfo(int TypeFlags);
- virtual void __fastcall UpdateRegistry(bool Register);
- __property _di_ITypeInfo ClassInfo = {read=FClassInfo};
- public:
- /* TComObjectFactory.Destroy */ __fastcall virtual ~TTypedComObjectFactory(void) { }
-
- };
-
- class DELPHICLASS TAutoObject;
- class PASCALIMPLEMENTATION TAutoObject : public Comobj::TTypedComObject
- {
- typedef Comobj::TTypedComObject inherited;
-
- private:
- void *__IDispatch; /* IDispatch */
-
- public:
- operator IDispatch*(void) { return (IDispatch*)&__IDispatch; }
-
- protected:
- virtual HRESULT __stdcall GetIDsOfNames(const GUID &IID, void * Names, int NameCount, int LocaleID,
- void * DispIDs);
- virtual HRESULT __stdcall GetTypeInfo(int Index, int LocaleID, /* out */ void *TypeInfo);
- virtual HRESULT __stdcall GetTypeInfoCount(/* out */ int &Count);
- virtual HRESULT __stdcall Invoke(int DispID, const GUID &IID, int LocaleID, Word Flags, void *Params
- , void * VarResult, void * ExcepInfo, void * ArgErr);
- public:
- /* TComObject.Create */ __fastcall TAutoObject(void) : Comobj::TTypedComObject() { }
- /* TComObject.CreateAggregated */ __fastcall TAutoObject(const _di_IUnknown Controller) : Comobj::TTypedComObject(
- Controller) { }
- /* TComObject.CreateFromFactory */ __fastcall TAutoObject(TComObjectFactory* Factory, const _di_IUnknown
- Controller) : Comobj::TTypedComObject(Factory, Controller) { }
- /* TComObject.Destroy */ __fastcall virtual ~TAutoObject(void) { }
-
- };
-
- typedef System::TMetaClass*TAutoClass;
-
- class DELPHICLASS TAutoObjectFactory;
- class PASCALIMPLEMENTATION TAutoObjectFactory : public Comobj::TTypedComObjectFactory
- {
- typedef Comobj::TTypedComObjectFactory inherited;
-
- private:
- _di_ITypeInfo FDispTypeInfo;
- System::TInterfaceEntry *FDispIntfEntry;
-
- public:
- __fastcall TAutoObjectFactory(TComServerObject* ComServer, System::TMetaClass* AutoClass, const GUID
- &ClassID, TClassInstancing Instancing);
- virtual System::PInterfaceEntry __fastcall GetIntfEntry(const GUID &Guid);
- __property System::PInterfaceEntry DispIntfEntry = {read=FDispIntfEntry};
- __property _di_ITypeInfo DispTypeInfo = {read=FDispTypeInfo};
- public:
- /* TComObjectFactory.Destroy */ __fastcall virtual ~TAutoObjectFactory(void) { }
-
- };
-
- class DELPHICLASS TAutoIntfObject;
- class PASCALIMPLEMENTATION TAutoIntfObject : public System::TInterfacedObject
- {
- typedef System::TInterfacedObject inherited;
-
- private:
- void *__IDispatch; /* IDispatch */
- void *__ISupportErrorInfo; /* ISupportErrorInfo */
-
- public:
- operator ISupportErrorInfo*(void) { return (ISupportErrorInfo*)&__ISupportErrorInfo; }
- operator IDispatch*(void) { return (IDispatch*)&__IDispatch; }
-
- private:
- _di_ITypeInfo FDispTypeInfo;
- System::TInterfaceEntry *FDispIntfEntry;
- GUID FDispIID;
-
- protected:
- HRESULT __stdcall GetIDsOfNames(const GUID &IID, void * Names, int NameCount, int LocaleID, void *
- DispIDs);
- HRESULT __stdcall GetTypeInfo(int Index, int LocaleID, /* out */ void *TypeInfo);
- HRESULT __stdcall GetTypeInfoCount(/* out */ int &Count);
- HRESULT __stdcall Invoke(int DispID, const GUID &IID, int LocaleID, Word Flags, void *Params, void *
- VarResult, void * ExcepInfo, void * ArgErr);
- HRESULT __stdcall InterfaceSupportsErrorInfo(const GUID &iid);
-
- public:
- __fastcall TAutoIntfObject(const _di_ITypeLib TypeLib, const GUID &DispIntf);
- virtual HRESULT __fastcall SafeCallException(System::TObject* ExceptObject, void * ExceptAddr);
- __property System::PInterfaceEntry DispIntfEntry = {read=FDispIntfEntry};
- __property _di_ITypeInfo DispTypeInfo = {read=FDispTypeInfo};
- __property GUID DispIID = {read=FDispIID};
- public:
- /* TInterfacedObject.Destroy */ __fastcall virtual ~TAutoIntfObject(void) { }
-
- };
-
- class DELPHICLASS EOleError;
- class PASCALIMPLEMENTATION EOleError : public Sysutils::Exception
- {
- typedef Sysutils::Exception inherited;
-
- public:
- /* Exception.Create */ __fastcall EOleError(const System::AnsiString Msg) : Sysutils::Exception(Msg
- ) { }
- /* Exception.CreateFmt */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleError(int Ident, Extended Dummy) : Sysutils::Exception(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const int
- Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleError(const System::AnsiString Msg, int AHelpContext) : Sysutils::
- Exception(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleError(int Ident, int AHelpContext) : Sysutils::Exception(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleError(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleError(void) { }
-
- };
-
- class DELPHICLASS EOleSysError;
- class PASCALIMPLEMENTATION EOleSysError : public Comobj::EOleError
- {
- typedef Comobj::EOleError inherited;
-
- private:
- int FErrorCode;
-
- public:
- __fastcall EOleSysError(const System::AnsiString Message, int ErrorCode, int HelpContext);
- __property int ErrorCode = {read=FErrorCode, write=FErrorCode, nodefault};
- public:
- /* Exception.CreateFmt */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Comobj::EOleError(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleSysError(int Ident, Extended Dummy) : Comobj::EOleError(Ident
- , Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Comobj::EOleError(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleSysError(const System::AnsiString Msg, int AHelpContext) :
- Comobj::EOleError(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleSysError(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Comobj::EOleError(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleSysError(int Ident, int AHelpContext) : Comobj::EOleError(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleSysError(int Ident, const System::TVarRec * Args, const
- int Args_Size, int AHelpContext) : Comobj::EOleError(Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleSysError(void) { }
-
- };
-
- class DELPHICLASS EOleException;
- class PASCALIMPLEMENTATION EOleException : public Comobj::EOleSysError
- {
- typedef Comobj::EOleSysError inherited;
-
- private:
- System::AnsiString FSource;
- System::AnsiString FHelpFile;
-
- public:
- __fastcall EOleException(const System::AnsiString Message, int ErrorCode, const System::AnsiString
- Source, const System::AnsiString HelpFile, int HelpContext);
- __property System::AnsiString HelpFile = {read=FHelpFile, write=FHelpFile};
- __property System::AnsiString Source = {read=FSource, write=FSource};
- public:
- /* Exception.CreateFmt */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size) : Comobj::EOleSysError(Msg, Args, Args_Size) { }
- /* Exception.CreateRes */ __fastcall EOleException(int Ident, Extended Dummy) : Comobj::EOleSysError(
- Ident, Dummy) { }
- /* Exception.CreateResFmt */ __fastcall EOleException(int Ident, const System::TVarRec * Args, const
- int Args_Size) : Comobj::EOleSysError(Ident, Args, Args_Size) { }
- /* Exception.CreateHelp */ __fastcall EOleException(const System::AnsiString Msg, int AHelpContext)
- : Comobj::EOleSysError(Msg, AHelpContext) { }
- /* Exception.CreateFmtHelp */ __fastcall EOleException(const System::AnsiString Msg, const System::TVarRec
- * Args, const int Args_Size, int AHelpContext) : Comobj::EOleSysError(Msg, Args, Args_Size, AHelpContext
- ) { }
- /* Exception.CreateResHelp */ __fastcall EOleException(int Ident, int AHelpContext) : Comobj::EOleSysError(
- Ident, AHelpContext) { }
- /* Exception.CreateResFmtHelp */ __fastcall EOleException(int Ident, const System::TVarRec * Args,
- const int Args_Size, int AHelpContext) : Comobj::EOleSysError(Ident, Args, Args_Size, AHelpContext
- ) { }
-
- public:
- /* TObject.Destroy */ __fastcall virtual ~EOleException(void) { }
-
- };
-
- struct TCallDesc;
- typedef TCallDesc *PCallDesc;
-
- #pragma pack(push, 1)
- struct TCallDesc
- {
- Byte CallType;
- Byte ArgCount;
- Byte NamedArgCount;
- Byte ArgTypes[256];
- } ;
- #pragma pack(pop)
-
- struct TDispDesc;
- typedef TDispDesc *PDispDesc;
-
- #pragma pack(push, 1)
- struct TDispDesc
- {
- int DispID;
- Byte ResType;
- TCallDesc CallDesc;
- } ;
- #pragma pack(pop)
-
- typedef HRESULT __stdcall (*TCoCreateInstanceExProc)(const GUID &clsid, _di_IUnknown unkOuter, int dwClsCtx
- , Activex::PCoServerInfo ServerInfo, int dwCount, Activex::PMultiQIArray rgmqResults);
-
- //-- var, const, procedure ---------------------------------------------------
- extern PACKAGE HRESULT __fastcall HandleSafeCallException(System::TObject* ExceptObject, void * ExceptAddr
- , const GUID &ErrorIID, const System::WideString ProgID, const System::WideString HelpFileName);
- extern PACKAGE void __fastcall OleError(HRESULT ErrorCode);
- extern PACKAGE void __fastcall OleCheck(HRESULT Result);
- extern PACKAGE GUID __fastcall StringToGUID(const System::AnsiString S);
- extern PACKAGE System::AnsiString __fastcall GUIDToString(const GUID &ClassID);
- extern PACKAGE GUID __fastcall ProgIDToClassID(const System::AnsiString ProgID);
- extern PACKAGE System::AnsiString __fastcall ClassIDToProgID(const GUID &ClassID);
- extern PACKAGE void __fastcall CreateRegKey(const System::AnsiString Key, const System::AnsiString ValueName
- , const System::AnsiString Value);
- extern PACKAGE void __fastcall DeleteRegKey(const System::AnsiString Key);
- extern PACKAGE _di_IUnknown __fastcall CreateComObject(const GUID &ClassID);
- extern PACKAGE _di_IUnknown __fastcall CreateRemoteComObject(const System::WideString MachineName, const
- GUID &ClassID);
- extern PACKAGE _di_IDispatch __fastcall CreateOleObject(const System::AnsiString ClassName);
- extern PACKAGE _di_IDispatch __fastcall GetActiveOleObject(const System::AnsiString ClassName);
- extern PACKAGE wchar_t * __fastcall StringToLPOLESTR(const System::AnsiString Source);
- extern PACKAGE void __fastcall RegisterComServer(const System::AnsiString DLLName);
- extern PACKAGE void __fastcall DispatchInvoke(const _di_IDispatch Dispatch, PCallDesc CallDesc, Activex::PDispIDList
- DispIDs, void * Params, System::PVariant Result);
- extern PACKAGE void __fastcall DispatchInvokeError(int Status, const tagEXCEPINFO &ExcepInfo);
- extern PACKAGE void __fastcall ReadPropFromBag(_di_IPropertyBag PropBag, _di_IErrorLog ErrorLog, const
- System::AnsiString Name, System::Variant &Value);
- extern PACKAGE void __fastcall PutPropInBag(_di_IPropertyBag PropBag, const System::AnsiString Name,
- const System::Variant &Value);
- extern PACKAGE TComClassManager* __fastcall ComClassManager(void);
-
- } /* namespace Comobj */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Comobj;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // ComObj
-